function main(defaultParams) {
    if (defaultParams.moduleActionType === 'form-save') {
        let litigantId = defaultParams.callbackParams.result.documentNo;
        let unitId = defaultParams.callbackParams.result["ds_tbl:t_d56d1837bd17409ab2b9de2fe7b9952f-4e19"].text_input_a0cp1n;
        const transformedData = [{
            unitId: unitId,
            litigantId: litigantId
        }]
        const jsonString = JSON.stringify(transformedData);
        console.log(jsonString);
        // insertDomain(jsonString).then(res => {
        insertClaim(jsonString).then(res => {
            console.log(res);
            self.$message.success("认领成功！");
            const pageListEle = this.$$("page_widget_list_87hyts");
            // 获取列表渲染页实例
            const listRenderView = pageListEle.$$getRenderElement();
            // 获取当前显示的组件，表格或者卡片
            const currentListEle = listRenderView.$$getListElement();
            // 调用刷新方法
            currentListEle.$$refreshData();
        });


    }
}

function insertClaim(jsonString) {
    return new Promise((resolve, reject) => {
        api.DATA_SOURCE_EXECUTE(":ds_api7b2c20a4-4ea4-43ba-b1f6-8231170026c2", "api", [], [], jsonString).then(res => {
            console.log(res);
            resolve(res);
        });
    });

}


